<template>
	<div class="zh-new-video">
		<nav-header>
			<template slot="menuBefore">
				<li><router-link to="/resources/video/video-list" tag="a">视频列表</router-link></li>
				<li class="gap">&gt;</li>
			</template>
		</nav-header>
		<div style="width: 800px;margin-top:40px;" v-loading="loading.status" :element-loading-text="loading.txt">
			<videMsg :compParam="compParam"></videMsg>
		</div>
	</div>
	
</template>
<script>
	import videMsg from './video-list/videMsg'

  	export default {
	    data() {
	      	return {
                loading:{
					status:false,
					txt:'获取数据...',
                },
	      		compParam:{
	      			editStatus:false,//是否编辑
	      			id:0
	      		},
	      		activeName: '1'
	      	};
	    },
	    created(){
            this.getDisk();
        },
	    components: {
	    	videMsg,
        },
        methods: {
            /**
             * 获取系统存储容量
             */
            getDisk() {
                this.loading.status = true;

                let success = (res => {
                    if (res.data[17] === 0) {
                       this.loading.status = false;
                    } else {
                        this.$message.error('系统存储容量小于5G，请清理存储空间（视频/资源文件）或升级存储');
                        this.$router.push('/resources/video/video-list');
                    }
            	})
            
                this.$ajax.get('api/system/system_info', {func: {success: success}})
            },
        },
  	};
</script>